/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import Beans.Interest;
import datas.InterestMapper;
import java.util.List;
import org.apache.ibatis.session.SqlSession;

/**

 @author jtanguay
 */
public class InterestDao {

  //Recuperation de tous les interets
  public static List<Interest> getInterestList() {
    SqlSession session = MyBatisManager.getSqlSession();

    try {
      InterestMapper mapper = session.getMapper(InterestMapper.class);
      List<Interest> intList = mapper.getAllInterest();

      return intList;
    } finally {
      MyBatisManager.closeConnexion();
    }
  }
}
